// .txt

beginzonescript;

variables;

short im_hostile = 0;
short last_abil;
short counter = 0;
short set_ter1 = 0;
short set_ter2 = 0;

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	set_name(30001,"Forest Exile");
	set_name(30002,"Exiled Brigand");
	set_name(2605,"Almar");
	set_boss_level(30002,1);
	
	set_name(2610,"Watcher Shella");
	set_name(2611,"The Silver Witch");

	set_name(2623,"Kranas Cultist");
	set_name(2630,"Kranas Cultist");
	set_name(30003,"Kranas Cultist");

//	set_attack_range(,);

//	add_ability(short which_char_or_group,short which_slot,short which_ability,0);

//	if (is_town_clear(ME))
//		clean_up_town();

	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if ((set_ter1 == 0) && (gf(26,13) > 2)) {
		set_ter1 = 1;
		erase_char(30002);
		set_floor(0,45,18,1);
		set_floor(0,46,18,1);
		set_floor(0,46,19,1);
		}
	if ((set_ter2 == 0) && (gf(26,19) > 0)) {
		set_ter2 = 1;
		set_terrain(0,46,10,0);
		set_terrain(0,47,10,0);
		}
	
	if ((is_talking() == FALSE) && (num_chars_in_group(2) == 0) && (gf(26,16) == 0)) {
		sf(26,16,1);
		begin_talk_mode(13);
		}
	if ((is_talking() == FALSE) && (on_which_layer() == 1) && (party_within_dist(9,11,6)) && (gf(26,19) == 0)) {
		sf(26,19,1);
		set_terrain(1,4,20,1);
		set_terrain(1,4,21,1);
		begin_talk_mode(17);
		}
		
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2605,"Move on.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2605,"We're safe here.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2605,"We keep to ourselves.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2605,"Just keep moving.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2610,"I am trapped here.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2610,"I am a Watcher.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2610,"Assasins lurk nearby.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2610,"I must return home.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2610,"This is my refuge.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2611,"I can help nobody.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2611,"Listen to the birds.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2611,"This is my refuge.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2611,"I see beyond.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2611,"My abilities can't help you.");


	//if (gf(,) < 2) {
	//	inc_flag(,,1);
	//	if (gf(,) == 2)
	//		begin_talk_mode();
	//	}

	//if (((is_combat()) && (tick_difference(last_abil,get_current_tick()) > 0)) || ((is_town()) && (tick_difference(last_abil,get_current_tick()) > 5))) {
	//	last_abil = get_current_tick();
	//	if ((gf(,) > 0) && (gf(,) < 100))
	//	}
break;

beginstate 10;
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

//	print_str("");
//	set_terrain_string_range(".",1);
//	set_terrain_string_range("The sign says - .",1);
